home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / mkutil21.zip / MAKEDEFS / VC16.MK < prev    next >
Text File  |  1995-02-06  |  4KB  |  137 lines

  1. #############################################################################
  2. #
  3. #                       Copyright (C) 1994 SciTech Software
  4. #                               All rights reserved.
  5. #
  6. # Descripton:   Generic DMAKE startup makefile definitions file. Assumes
  7. #               that the SCITECH environment variable has been set to point
  8. #               to where all our stuff is installed. You should not need
  9. #               to change anything in this file.
  10. #
  11. #               Microsoft Visual C++ 1.5 16 bit version.
  12. #
  13. # $Id: vc16.mk 1.1 1995/02/06 12:50:38 kjb release $
  14. #
  15. #############################################################################
  16.  
  17. # Disable warnings for macros redefined here that were given
  18. # on the command line.
  19. __.SILENT       := $(.SILENT)
  20. .SILENT         := yes
  21.  
  22. # File suffix definitions
  23.    L            := .lib   # Libraries
  24.    E            := .exe   # Executables
  25.    O            := .obj   # Objects
  26.    A            := .asm   # Assembler sources
  27.    P            := .cpp   # C++ sources
  28.  
  29. # Import enivornment variables that we use
  30. TMPDIR := $(ROOTDIR)/tmp
  31. .IMPORT .IGNORE : TMPDIR COMSPEC INCLUDE LIB SCITECH DBG OPT SHW BETA FPU
  32. .IMPORT .IGNORE : USE_WIN16
  33.  
  34. # We use the MSDOS shell at all times
  35.    SHELL        := $(COMSPEC)
  36.    GROUPSHELL   := $(SHELL)
  37.    SHELLFLAGS   := $(SWITCHAR)c
  38.    GROUPFLAGS   := $(SHELLFLAGS)
  39.    SHELLMETAS   := *"?<>
  40.    GROUPSUFFIX  := .bat
  41.    DIRSEPSTR    := \\
  42.    DIVFILE       = $(TMPFILE:s,/,\)
  43.  
  44. # Default commands for compiling, assembling linking and archiving
  45.    CC           := cl       # C-compiler and flags
  46.    CFLAGS       := /AL /YX /w
  47.    AS           := tasm     # Assembler and flags
  48.    ASFLAGS      := /mx /m /D__COMM__ /i$(SCITECH)\INCLUDE
  49.    LD           := cl       # Loader and flags
  50.    LDFLAGS       = $(CFLAGS)
  51.    LIB          := lib      # Librarian
  52.    LIBFLAGS     := /NOI /NOE
  53.  
  54. # Optionally turn on debugging information
  55. .IF $(DBG)
  56.    CFLAGS       += /Yd /Zi  # Turn on debugging for C compiler
  57.    ASFLAGS      += /zi      # Turn on debugging for assembler
  58. .END
  59.  
  60. # Optionally turn on optimisations
  61. .IF $(OPT)
  62.    CFLAGS       += /G3 /Ox
  63. .END
  64.  
  65. # Optionally turn on direct i387 FPU instructions
  66.  
  67. .IF $(FPU)
  68.    CFLAGS       += /FPi87 /DFPU387
  69.    ASFLAGS      += /DFPU387 /DFPU_REG_RTN
  70. .END
  71.  
  72. # Optionally compile a shareware version of a product
  73. .IF $(SHW)
  74.    LIB_DIR      := LIBSW
  75.    CFLAGS       += /DSHAREWARE
  76. .ELSE
  77.    LIB_DIR      := LIB
  78. .END
  79.  
  80. # Optionally compile a beta release version of a product
  81. .IF $(BETA)
  82.    CFLAGS       += /DBETA
  83.    ASFLAGS      += /DBETA
  84. .END
  85.  
  86. # Use a larger stack during linking if requested ???? How the fuck do you
  87. # specify linker options on the CL command line?????
  88.  
  89. .IF $(STKSIZE)
  90. .ENDIF
  91.  
  92. # Optionally compile for 16 bit Windows DPMI
  93. .IF $(USE_WIN16)
  94.    DX_CFLAGS    += -DWINDPMI16
  95.    DX_ASFLAGS   += -DWINDPMI16 -D__PM286__
  96. .END
  97.  
  98. # Place to look for PMODE library files
  99.  
  100. .IF $(MK_PMODE)
  101. .ELIF $(USE_WIN16)
  102. PMLIB           := win16\pmode.lib
  103. .ELSE
  104. PMLIB           := pmode.lib
  105. .END
  106.  
  107. # Define where to install library files
  108.    LIB_BASE     := $(SCITECH)\$(LIB_DIR)\VC16
  109.    LIB_DEST     := $(LIB_BASE)
  110.  
  111. # Definition of $(MAKE) macro for recursive makes.
  112.    MAKE = $(MAKECMD) $(MFLAGS)
  113.  
  114. # Macro to install a library file
  115.    INSTALL      := cp
  116.  
  117. # Implicit generation rules for making object files
  118.    %$O: %.c ; +$(CC) /nologo $(CFLAGS) /c $<
  119.    %$O: %$P ; +$(CC) /nologo $(CFLAGS) /c $<
  120.    %$O: %$A ; +$(AS) $(ASFLAGS) $(<:s,/,\)
  121.  
  122. # Implicit rule for building a library file using response file
  123.    %$L:      ; $(LIB) /nologo $(LIBFLAGS) $@ @$(mktmp -+$(?:t" &\n-+") &\n,,\n)
  124.  
  125. # Implicit rule for building an executable file using response file
  126.    %$E:      ; $(LD) @$(mktmp $(LDFLAGS) /Fe$@ $(&:s/\/\\) $(PMLIB) $(EXELIBS))
  127.  
  128. # DMAKE uses this recipe to remove intermediate targets
  129. .REMOVE :; $(RM) -f $<
  130.  
  131. # Turn warnings back to previous setting.
  132. .SILENT := $(__.SILENT)
  133.  
  134. # We dont use TABS in our makefiles
  135. .NOTABS         := yes
  136.  
  137.